package com.qq.spirit.inter;

import com.qq.spirit.TaskManager;

/**
 * 任务单元
 * 
 * @author beedoorwei
 * 
 */
public abstract class TaskUnit implements Runnable
{
	public String username;

	public void run()
	{
		try
		{
			doTask();
		} catch (Exception ex)
		{

		} finally
		{
			TaskManager.removeTask(this);
		}
	}

	public abstract void doTask();

	public String getUsername()
	{
		return username;
	}

	public void setUsername(String username)
	{
		this.username = username;
	}

}
